<div class="modal" id="editModal">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h3 ng-hide='isNew'>Editar Condi&ccedil;&atilde;o de Pagamento</h3>
				<h3 ng-show='isNew'>Incluir Condi&ccedil;&atilde;o de Pagamento</h3>
			</div>
			<form name="detailForm" ng-controller="DefaultFormCtrl" novalidate>
				<div class="modal-body">
					<div class="form-group" ng-class="{ 'has-error' : detailForm.selFormPagto.$invalid && !detailForm.selFormPagto.$pristine }">
						<label for="selFormPagto">Forma de Pagamento</label>
						<select class="form-control" id="selFormPagto" name="selFormPagto" ng-model="item.formaPagamento.id" ng-options="f.id as f.descricao for f in formsPagto" required>
					    	<option value="">Selecione</option>
					  	</select>
					  	<span class="help-block" ng-show="detailForm.selFormPagto.$invalid && !detailForm.selFormPagto.$pristine">Campo obrigat&oacute;rio!</span>
					</div>
					<div class="form-group" ng-class="{ 'has-error' : detailForm.selParcelas.$invalid && !detailForm.selParcelas.$pristine }">
						<label for="selParcelas">Qtd. de Parcelas</label>
						<select class="form-control" id="selParcelas" name="selParcelas" ng-model="item.parcelas" required>
							<option value="1">Uma vez</option>
						    <option value="2">Duas vezes</option>
						    <option value="3">Tr&ecirc;s vezes</option>
						    <option value="4">Quatro vezes</option>
						</select>
						<span class="help-block" ng-show="detailForm.selParcelas.$invalid && !detailForm.selParcelas.$pristine">Campo obrigat&oacute;rio!</span>
					</div>
					<div class="form-group" ng-class="{ 'has-error' : detailForm.valorMinimo.$invalid && !detailForm.valorMinimo.$pristine }">
						<label for="valorMinimo">Valor M&iacute;nimo (R$)</label>
						<input type="text" class="form-control moeda" id="valorMinimo" name="valorMinimo" maxlength="10" placeholder="Valor M&iacute;nimo (R$)" ng-model="item.valorMinimo" simon-decimal-format required/>
						<span class="help-block" ng-show="detailForm.valorMinimo.$invalid && !detailForm.valorMinimo.$pristine">Campo obrigat&oacute;rio!</span>
					</div>
					<div class="form-group" ng-class="{ 'has-error' : detailForm.diasVencimento.$invalid && !detailForm.diasVencimento.$pristine }">
						<label for="diasVencimento">Dias Vencimento</label>
						<input type="text" class="form-control percentual3" id="diasVencimento" name="diasVencimento" maxlength="3" placeholder="Dias Vencimento" ng-model="item.diasVencimento" required/>
						<span class="help-block" ng-show="detailForm.diasVencimento.$invalid && !detailForm.diasVencimento.$pristine">Campo obrigat&oacute;rio!</span>
					</div>
				</div>
				<div class="modal-footer">
					<button class="btn btn-default" data-dismiss="modal" role="button">Fechar</button>
					<button ng-hide='isNew' class="btn btn-primary" id="btnAtualizar" data-dismiss="modal" ng-click="update()" role="button" ng-disabled="detailForm.$invalid">Atualizar</button>
					<button ng-show='isNew' class="btn btn-primary" id="btnIncluir" data-dismiss="modal" ng-click="insert()" role="button" ng-disabled="detailForm.$invalid">Incluir</button>
				</div>
			</form>
		</div>
	</div>
</div>